

//页面状态相关
let status = {
};

// 和网络交互相关的参数
let params = {
  searchParams:{
    date : ""
  }
};

// 页面的数据源
let data = {
  dailyStatisticFailList: [],
};

// 页码相关
let page = {
  total: 1,
  startIndex: 0,
  stepNumber: 60,
  currentPage: 1
};

//列表
let dailyStatisticFailTable=function (self) {
  return [
    {
      type: 'index',
      title: '#',
      width: 80,
      key: 'index',
      fixed: 'left',
      align: 'center',
    },
    {
      title: '统计类型',
      width: 200,
      align:'center',
      render: (h, params) => {
        let type = params.row.statisticType;
        if (type == 1){
          return (<div><span>用户数据</span></div>);
        } else if (type == 2){
          return (<div><span>产品数据</span></div>);
        } else {
          return (<div></div>);
        }
      }
    },
    {
      title: '统计日期',
      width: 240,
      align: 'center',
      render: (h, params) => {
        return h('div',params.row.failDate);
      }
    },
    {
      title: '操作',
      width: 140,
      align:'center',
      render: (h, params) => {
        return (
          <div>
            < i-button type="primary" size="small" onClick={() => {  self.reStatistic(params.row.id);}}>重新统计</i-button>
          </div>
        );
      }
    }
  ];
};

export  default  {
  tStatus: status,
  tParams: params,
  tData: data,
  tPage: page,
  dailyStatisticFailTable:dailyStatisticFailTable,
};
